
<!DOCTYPE html>
<html lang="en">

    <head>

        <meta charset="utf-8">
        <title>敏捷协会在线报名系统</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">

        <!-- CSS -->
        <!--<link rel='stylesheet' href='http://fonts.googleapis.com/css?family=PT+Sans:400,700'>
        <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Oleo+Script:400,700'>-->
        <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
        <link rel="stylesheet" href="assets/css/style.css">

        <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
            <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

    </head>

    <body>

        <div class="header">
            <div class="container">
                <div class="row">
                    <div class="logo span4">
                        <h1><a href="index.php">敏捷软件协会</a></h1>
                    </div>
                    <div class="links span8">
                        <!--<a class="home" href="" rel="tooltip" data-placement="bottom" data-original-title="Home"></a>
                        <a class="blog" href="" rel="tooltip" data-placement="bottom" data-original-title="Blog"></a>-->
                        <a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=a0480ae4e9da043f3c170bbcbf958149a58a73135deadea7b963d13c287b31be"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="敏捷交流群" title="敏捷交流群"></a>
                    </div>
                </div>
            </div>
        </div>

        <div class="register-container container">
            <div class="row">
                <div class="iphone span5">
                    <img src="assets/img/ren.png" alt="">
                </div>
                <div class="register span6">
                    <form action="" method="post">
                        <h2>敏捷软件协会在线<span class="red"><strong>报名</strong></span></h2>
                        <!-- <label for="name">姓名</label>
                        <input type="text" id="name" name="name" placeholder="请输入你的姓名...">
                        
                        <label for="classname">班级</label>
                        <input type="text" id="classname" name="classname" placeholder="例如：15计算机1班，14计算机1班...">
                        
                        <label for="phone">手机号码</label>
                        <input type="text" id="phone" name="phone" placeholder="请输入你的手机号码...">
                        
                        <label for="qq">QQ</label>
                        <input type="text" id="qq" name="qq" placeholder="请输入你的QQ...">
                        
                        <label for="study">你学习过编程吗？</label>
                        <input type="text" id="study" name="study" placeholder="如果有，那你学过什么...">
                        
                        <label for="technology">你是否有一手比较精通或者熟练的技术？</label>
                        <input type="text" id="technology" name="technology" placeholder="跟我说说看...">
                        
                        <label for="why">你为什么要加入本协会？</label>
                        <input type="text" id="why" name="why" placeholder="你为什么要加入本协会...">
                        
                        <button type="submit">马上报名!</button>
                        <button type="button" onclick="location.href='search.php';">查询是否已经报名</button> -->
                        <p style="font-size: 20px;">敏捷软件协会招新工作已圆满结束。</p>
                        <button type="button" onclick="location.href='mak.php';">查询通过审核名单</button>
                    </form>
                </div>
            </div>
        </div>
		<div align="center">Copyright &copy; 2015 敏捷软件协会 by Mak <a href="admin/index.php">后台管理</a>
</div>
        <!-- Javascript -->
        <script src="assets/js/jquery-1.8.2.min.js"></script>
        <script src="assets/bootstrap/js/bootstrap.min.js"></script>
        <script src="assets/js/jquery.backstretch.min.js"></script>
        <script src="assets/js/scripts.js"></script>

<!--<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>-->
<?php
include"admin/conn.php";

if ((isset($_POST["name"])) && (isset($_POST["classname"])) && (isset($_POST["phone"])) && (isset($_POST["qq"])) && (isset($_POST["study"])) && (isset($_POST["technology"])) && (isset($_POST["why"]))){
   
        /*$conn = @mysql_connect(SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS);*/
   
    $name=$_POST['name'];
	$classname=$_POST['classname'];
	$phone=$_POST['phone'];
	$qq=$_POST['qq'];
	$study=$_POST['study'];
	$technology=$_POST['technology'];
	$why=$_POST['why'];

	
   
   /*mysql_select_db(SAE_MYSQL_DB,$conn);
   mysql_query("set names utf8");*/
   
   $str=mysql_query("select * from mj where name='$name' and phone='$phone'");
    if  (mysql_num_rows($str)>=1)
	{
		
		exit('<script type="text/javascript">
			      alert("你已经报过名！\n 敏捷交流群：515802990");
				  window.location.href="index.php";
				  </script>');
		
	}
   
   $str="insert into mj(name,classname,phone,qq,study,technology,why,etime) values('$name','$classname','$phone','$qq','$study','$technology','$why',now())";
    if  (mysql_query($str,$conn))
	{
		
		echo '<script type="text/javascript">
			      alert("恭喜你！报名成功！\n 敏捷交流群：515802990");
				  window.location.href="index.php";
				  </script>';
		
	}
	else
	{
	   echo '<script type="text/javascript">
			      alert("对不起，报名失败！\n 敏捷交流群：515802990");
				  window.location.href="index.php";
				  </script>';
	}
	
	

  mysql_close($conn);}
  
  
  
?>
</body>
</html>